package com.geqian.structure.db;

import com.geqian.structure.pojo.DatabaseInfo;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author geqian
 * @date 12:49 2023/7/12
 */
@Configuration
public class DatabaseConfig {

    @ConfigurationProperties(prefix = "database.info.mysql")
    @Bean
    public DatabaseInfo mysql(){

        return new DatabaseInfo();
    }

    @ConfigurationProperties(prefix = "database.info.oracle")
    @Bean
    public DatabaseInfo oracle(){
        return new DatabaseInfo();
    }


    @ConfigurationProperties(prefix = "database.info.db2")
    @Bean
    public DatabaseInfo db2(){
        return new DatabaseInfo();
    }

}
